/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DTO;

import BLL.BComment;
import java.util.ArrayList;

/**
 *
 * @author Vien-IT
 */
public class User {
    
    private int userId ;
    private String username;
    private String password;
    private String email ;
    private String address;
    private String numberPhone;
    private ArrayList<Comment> comments ;

    public User() {
    }

    /**
     * @return the userId
     */
    public int getUserId() {
        return userId;
    }

    /**
     * @param userId the userId to set
     */
    public void setUserId(int userId) {
        this.userId = userId;
    }

    /**
     * @return the username
     */
    public String getUsername() {
        return username;
    }

    /**
     * @param username the username to set
     */
    public void setUsername(String username) {
        this.username = username;
    }

    /**
     * @return the password
     */
    public String getPassword() {
        return password;
    }

    /**
     * @param password the password to set
     */
    public void setPassword(String password) {
        this.password = password;
    }

    /**
     * @return the email
     */
    public String getEmail() {
        return email;
    }

    /**
     * @param email the email to set
     */
    public void setEmail(String email) {
        this.email = email;
    }

    /**
     * @return the address
     */
    public String getAddress() {
        return address;
    }

    /**
     * @param address the address to set
     */
    public void setAddress(String address) {
        this.address = address;
    }

    /**
     * @return the comments
     */
    public ArrayList<Comment> getComments() {
        if(this.comments == null)
        {
            BComment bcomment = new BComment();
            this.comments = bcomment.getByUserId(this.userId);
        }
        
        return this.comments;
    }

   
    /**
     * @return the numberPhone
     */
    public String getNumberPhone() {
        return numberPhone;
    }

    /**
     * @param numberPhone the numberPhone to set
     */
    public void setNumberPhone(String numberPhone) {
        this.numberPhone = numberPhone;
    }

    
    
    
    
}
